<template>
    <div class="info_item">
        <van-cell is-link style="align-items:center" @click="isshow">
            <div class="info_left">
                <span>{{ skuMap.title }}：</span>
                <span>{{ skuMap.freightInfo }}</span>
            </div>
        </van-cell>
        <van-popup v-model:show="show" position="bottom" :style="{ height: '55%' }" closeable>
            <h1 class="popup_title">标题</h1>
            <div class="popup_list">
                <div class="list_item" v-for="item in skuMap.policyList" :key="item.title">
                    <div class="item_title">
                        <span>{{ item.title }}</span>
                    </div>
                    <div class="item_desc">{{ item.content }}</div>
                </div>
            </div>
        </van-popup>
    </div>
</template>

<script lang="ts">
import { defineComponent } from "vue"
export default defineComponent({
    name: 'ProductPopUp',
})
</script>

<script lang="ts" setup>
import { ref } from 'vue'
const show = ref(false)
const Props = defineProps(['skuMap'])

function isshow(){
    show.value = !show.value
}
</script>

<style scoped>
/* 商品信息 */
.order_info {
    padding-left: 15px;
    margin-bottom: 15px;
    background-color: #fff;
}

.order_info .info_item {
    /* padding-right: 15px; */
    border-bottom: 1px solid #eee;
}

.order_info .info_left {
    display: flex;
    align-items: center;
    height: 52px;
    line-height: 52px;
    font-size: 14px;
    color: #333;
}

/* 弹出框标题 */
.popup_title {
    font-size: 16px;
    text-align: center;
    border-bottom: 1px solid #ccc;
    padding: 16px;
    font-weight: normal;
}

.popup_list {
    padding: 22px 15px;
}

.popup_list .list_item {
    font-size: 14px;
}

.popup_list .list_item .item_title {
    position: relative;
    padding-left: 10px;
    padding-bottom: 10px;
}

.popup_list .list_item .item_title::after {
    position: absolute;
    left: 0;
    top: 10px;
    content: '';
    width: 4px;
    height: 4px;
    background-color: red;
    border-radius: 50%;
}

.popup_list .list_item .item_desc {
    font-size: 14px;
    color: #999;
}</style>